home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / te2_130t.zip / TE2INST.003 / FaxWorks.scr < prev    next >
Text File  |  1994-03-28  |  2KB  |  47 lines

  1. /* -------------------------------------------------------------------- */
  2. /* FaxWorks.scr -- TE/2 - REXX syntax script                            */
  3. /* Copyright (c) 1994, Oberon Software                                  */
  4. /* All rights reserved                                                  */
  5. /*                                                                      */
  6. /* Usage: run("FaxWorks", "[ON|OFF]")                                   */
  7. /*                                                                      */
  8. /* -------------------------------------------------------------------- */
  9.  
  10. FxRcv     = 'D:\Comm\PMfax\FxRcv'  /* <-- Replace this as appropriate */
  11. MnuTitle  = 'FaxWorks Actions'
  12. MnuItem.  = ''
  13. MnuItem.0 = 3
  14. MnuItem.1 = 'Receive calls'
  15. MnuItem.2 = 'Off line'
  16. MnuItem.3 = 'Exit script'
  17. MnuTop    = 5
  18. MnuLeft   = 20
  19. MnuAttr   = 0x1f
  20. MnuHiAttr = 0x71
  21. MnuDelim  = '!'
  22.  
  23. parse arg parm stuff
  24. if length(parm) = 0 then
  25.   do
  26.     MnuBuf = ''
  27.     do i = 1 to MnuItem.0
  28.       MnuBuf = MnuBuf||MnuDelim||MnuItem.i
  29.     end
  30.     MnuBuf = MnuBuf||MnuDelim
  31.     'PopupMenu("'MnuTitle'", "'MnuBuf'", 'mnuTop', 'mnuLeft', 'mnuAttr', 'mnuHiAttr', 1)'
  32.     i = rc
  33.     select
  34.       when i = 1 then parm = 'ON'
  35.       when i = 2 then parm = 'OFF'
  36.       otherwise       parm = ''
  37.     end
  38.   end
  39.  
  40. if length(parm) = 0 then exit 0
  41. select
  42.   when parm = 'ON'  then address CMD FxRcv '-on'
  43.   when parm = 'OFF' then address CMD FxRcv '-off'
  44.   otherwise say 'Illegal parameter "'parm'", use "ON" or "OFF"'
  45. end
  46. exit 0
  47.